package com.xj.homework.pattern.proxy.jdkProxy;

import java.lang.reflect.Proxy;

public class Client {

    public static void main(String[] args) {
        JavaSubject javaSubject = new JavaSubject();

        ProxyHandler handler = new ProxyHandler(javaSubject);
        Subject subject = (Subject) Proxy.newProxyInstance(javaSubject.getClass().getClassLoader(), javaSubject.getClass().getInterfaces(), handler);
        subject.study();
    }
}
